package com.example.activiti.service;

import com.example.activiti.common.MessageBody;
import com.example.activiti.model.ActTask;
import com.example.activiti.model.LeaveDTO;
import com.example.activiti.model.ProcessModelVO;
import org.activiti.engine.history.HistoricTaskInstance;
import org.activiti.engine.repository.Model;
import org.activiti.engine.task.Task;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 * @author Mr.yuan
 * @version v1.0
 * @date 2019/11/12 11:19
 **/
public interface ProcessService {

    List<ProcessModelVO> findProcessList();

    String createProcessModel();

    void deployModel(String modelId) throws IOException;

    void processUpload(MultipartFile file) throws Exception;

    void submitProcess(LeaveDTO param);

    void suspendTask(String processInstanceId);

    void activeTask(String processInstanceId);

    List<Task> findCandidateTasks(String userId);

    List<HistoricTaskInstance> findHistoryTasks(String assignee);

    void taskTrace(String processInstanceId, HttpServletResponse response) throws IOException;

    MessageBody processView(String processDefinitionId, String resourceName, HttpServletResponse response) throws IOException;

    List<HistoricTaskInstance> findOrganizerTasks(String id);

    List<ActTask> findHandleTasks(String id);

    void claim(String taskId);

    List<Model> findModelList();

    Object getLeaveType();

    void export(String deploymentId) throws IOException;
}
